//==========================================================================
// Copyright (c) 2000-2008,  Elastos, Inc.  All Rights Reserved.
//==========================================================================
#include <asm.h>
# *************************************************************************
.global C_SYMBOL(get_cpu_mode)
.global C_SYMBOL(WriteCLKCFG)


C_SYMBOL(get_cpu_mode):
    mrc  p14, 0, r0, c6, c0, 0
    mov pc, lr


.macro PUT_CLKCFG rd


        // mask out irrelevant bits
        and     \rd, \rd, #0xF

        // write CLKCFG's value
        mcr p14, 0, \rd, c6, c0, 0

    .endm


C_SYMBOL(WriteCLKCFG):
        PUT_CLKCFG   r0
        mov pc, lr
